package com.example.mqproduct.job;

import com.example.mqproduct.product.Demo01Product;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Log4j2
@Component
public class MessageJob {

    @Autowired
    Demo01Product demo01Product;

    @Scheduled(cron = "0/5 * * * * ?")
    public void execute() {
//        demo01Product.sendMsg2((int) (System.currentTimeMillis() / 1000), "hello.world.yu.nai.aaa");

        demo01Product.sendMsg5((int) (System.currentTimeMillis() / 1000));
    }
}
